package cn.ytzb.controller;

import cn.ytzb.pojo.Admin;
import cn.ytzb.service.AdminService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author XiaoMo
 * @Date 2022/3/17 8:56
 * @Version 1.0
 */
@RestController
@RequestMapping("/admin")
public class AdminController {
    @Resource
    private AdminService adminService;

    @GetMapping("/find")
    public List<Admin> find(){

        return adminService.findAll();
    }
}
